package net.takela.dict.dao;

import net.takela.dict.model.SysDict;
import net.takela.dict.model.SysDictSearchArgs;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by baboy on 07/12/2016.
 */
@Repository
public interface SysDictDao {
    /**
     *
     * @param dict dict
     * @return result
     */
    Integer add(SysDict dict);

    /**
     *
     * @param dict dict
     * @return result
     */
    boolean update(SysDict dict);

    /**
     *
     * @param items items
     * @return result
     */
    boolean addItems(List<SysDict.SysDictItem> items);

    /**
     *
     * @param dictId dictId
     * @return result
     */
    boolean removeItems(Integer dictId);

    /**
     *
     * @param args args
     * @return result
     */
    List<SysDict>search(SysDictSearchArgs args);

    /**
     *
     * @param dictKey dictKey
     * @return result
     */
    SysDict getDictByKey(String dictKey);
}
